// componets/tab-bar/tab-bar.js
Component({

  /**
   * 组件的属性列表
   */
  properties: {
    activeIndex: {
      type: [Number, String]
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    list: [{
        "pagePath": "/pages/wallet/details/details",
        "text": "收支明细",
        "iconPath": "/assets/tabBarIcon/i_details.png",
        "selectedIconPath": "/assets/tabBarIcon/i_details_on.png",
        "color": "#707070",
        "selectedColor": "#FFBD27"
      },
      {
        "pagePath": "/pages/wallet/bill/bill",
        "text": "账单",
        "iconPath": "/assets/tabBarIcon/i_list.png",
        "selectedIconPath": "/assets/tabBarIcon/i_list_on.png",
        "color": "#707070",
        "selectedColor": "#FFBD27"
      },
      {
        "pagePath": "/pages/wallet/expendincome/expendincome",
        "text": "记一笔",
        "iconPath": "/assets/tabBarIcon/i_edit.png",
        "selectedIconPath": "/assets/tabBarIcon/i_edit_on.png",
        "color": "#707070",
        "selectedColor": "#FFBD27"
      },
      {
        "pagePath": "/pages/wallet/mine/mine",
        "text": "我的",
        "iconPath": "/assets/tabBarIcon/i_mine.png",
        "selectedIconPath": "/assets/tabBarIcon/i_mine_on.png",
        "color": "#707070",
        "selectedColor": "#FFBD27"
      }
    ]
  },

  /**
   * 组件的方法列表
   */
  methods: {
      jumpPage(event){
        let path = event.currentTarget.dataset.path;// 页面路径
        console.log("path:",path)
        wx.redirectTo({
          url: path,
        })
      }
  }
})